luci-base: add `responseProgress` callback and `stderr` option
authorRichard Yu <[email protected]>
Mon, 1 Sep 2025 14:39:47 +0000 (22:39 +0800)
committerPaul Donald <[email protected]>
Mon, 15 Dec 2025 13:44:43 +0000 (14:44 +0100)
commit2106f0952f5c0cc0a307b9146e6ffd28505e06e7
treea953c5f87c8c7318dc0d37ad6fa30a95224448f1
parentd3b061dc66afaa9eeb60b32e987b134d5b98093b
luci-base: add `responseProgress` callback and `stderr` option
for LuCI.request and `fs.exec_direct()`.

This commit adds XHR response progress event option in luci.js and fs.js.
And diagnostics.js will use this new event to update command output.

This commit also adds a `stderr` option in `fs.exec_direct()`, and
requires a patch for `cgi-io`.

Currently `cgi-io` redirects stderr to /dev/null, which makes user
unable to see error messages. The patch adds a `stderr` option,
and if it's set to `1`, redirects stderr to stdout.

Signed-off-by: Richard Yu <[email protected]>
Link: https://github.com/openwrt/luci/pull/7920
(cherry picked from commit ece28ab5a4d476c73d404fbbb6d3b919832fea13)
modules/luci-base/htdocs/luci-static/resources/fs.js
modules/luci-base/htdocs/luci-static/resources/luci.js